home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QuickTime 1.0 for Developers
/
QuickTime 1.0 for Developers.iso
/
Programming Stuff
/
Interfaces
/
Oldstyle C Interfaces
/
Movies.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-09-06
|
29KB
|
967 lines
/*
File: Movies.h
Copyright: © 1991 by Apple Computer, Inc., all rights reserved.
*/
#ifndef _Movies_
#define _Movies_
#include <Aliases.h>
#include <QuickDraw.h>
#include "Components.h"
#include "TimeBases.h"
#include "Matrix.h"
#ifndef kFix1
#define kFix1 (0x00010000)
#endif
#define MOVIE_FILE_ID 'MooV'
#define DoTheRightThing 0L
typedef struct privateMovieRecord *Movie;
typedef struct privateTrackRecord *Track;
typedef struct privateMediaRecord *Media;
typedef struct privateUserDataRecord *UserData;
typedef struct privateTrackEditStateRecord *TrackEditState;
typedef struct privateMovieEditStateRecord *MovieEditState;
typedef struct PriorityType {
unsigned short level; /* priority level */
unsigned short percent; /* percent to allocate at the priority level */
} PriorityType;
struct SampleDescription {
long size;
long type;
long resvd1;
short resvdA;
short dataRefBlobId;
};
typedef struct SampleDescription SampleDescription;
typedef SampleDescription *SampleDescriptionPtr, **SampleDescriptionHandle;
#define gestaltQuickTime 'qtim'
struct SoundDescription {
long descSize; /* total size of SoundDescription including extra data */
long dataFormat; /* */
long resvd1; /* reserved for apple use */
long resvd2; /* reserved for apple use */
short version; /* which version is this data */
short revlevel; /* what version of that codec did this */
long vendor; /* whose codec compressed this data */
short numChannels; /* number of channels of sound */
short sampleSize; /* number of bits per sample */
short compressionID; /* sound compression used, 0 if none */
short packetSize; /* packet size for compression, 0 if no compression */
Fixed sampleRate; /* sample rate sound is captured at */
};
typedef struct SoundDescription SoundDescription;
typedef SoundDescription *SoundDescriptionPtr, **SoundDescriptionHandle;
/* progress messages */
enum {
movieProgressOpen = 0,
movieProgressUpdatePercent = 1,
movieProgressClose = 2
};
/* progress operations */
enum {
progressOpFlatten = 1,
progressOpInsertTrackSegment,
progressOpInsertMovieSegment,
progressOpPaste,
progressOpAddMovieSelection,
progressOpCopy,
progressOpCut,
progressOpLoadMovieIntoRam,
progressOpLoadTrackIntoRam,
progressOpLoadMediaIntoRam
};
#if THINK_C==1
#define MovieProgressProcPtr ProcPtr
#else
typedef pascal Boolean (*MovieProgressProcPtr)(Movie m, short message, short whatOperation, Fixed percentDone, long refcon);
#endif
typedef ComponentInstance MediaHandler,DataHandler;
typedef ComponentResult HandlerError;
#ifdef __cplusplus
extern "C" {
#endif __cplusplus
/****************************************
* *
* W A R H O L *
* *
****************************************/
/*************************
* Initialization Routines
**************************/
pascal OSErr EnterMovies( void )
= {0x303c,0x1,0xaaaa};
pascal void ExitMovies( void )
= {0x303c,0x2,0xaaaa};
/*************************
* Error Routines
**************************/
#if THINK_C==1
#define ErrorProcPtr ProcPtr
#else
typedef pascal void (*ErrorProcPtr)(OSErr theErr, long refcon);
#endif
pascal OSErr GetMoviesError( void )
= {0x303c,0x3,0xaaaa};
pascal void ClearMoviesStickyError( void )
= {0x303c,0xde,0xaaaa};
pascal OSErr GetMoviesStickyError( void )
= {0x303c,0x4,0xaaaa};
pascal void SetMoviesErrorProc( ErrorProcPtr errProc, long refcon )
= {0x303c,0xef,0xaaaa};
/*************************
* Idle Routines
**************************/
pascal void MoviesTask( Movie m, long maxMilliSecToUse )
= {0x303c,0x5,0xaaaa};
pascal OSErr PrerollMovie( Movie m, TimeValue time, Fixed Rate )
= {0x303c,0x6,0xaaaa};
pascal OSErr LoadMovieIntoRam( Movie m, TimeValue time, TimeValue duration, long flags )
= {0x303c,0x7,0xaaaa};
pascal OSErr LoadTrackIntoRam( Track t, TimeValue time, TimeValue duration, long flags )
= {0x303c,0x16e,0xaaaa};
pascal OSErr LoadMediaIntoRam( Media m, TimeValue time, TimeValue duration, long flags )
= {0x303c,0x8,0xaaaa};
pascal void SetMovieActive( Movie m, Boolean active )
= {0x303c,0x9,0xaaaa};
pascal Boolean GetMovieActive( Movie m )
= {0x303c,0xa,0xaaaa};
/*************************
* calls for playing movies, previews, posters
**************************/
pascal void StartMovie( Movie m )
= {0x303c,0xb,0xaaaa};
pascal void StopMovie( Movie m )
= {0x303c,0xc,0xaaaa};
pascal void GotoBeginningOfMovie( Movie m )
= {0x303c,0xd,0xaaaa};
pascal void GotoEndOfMovie( Movie m )
= {0x303c,0xe,0xaaaa};
pascal Boolean IsMovieDone( Movie m )
= {0x303c,0xdd,0xaaaa};
pascal Boolean GetMoviePreviewMode( Movie m )
= {0x303c,0xf,0xaaaa};
pascal void SetMoviePreviewMode( Movie m, Boolean usePreview )
= {0x303c,0x10,0xaaaa};
pascal void ShowMoviePoster( Movie m )
= {0x303c,0x11,0xaaaa};
#if THINK_C==1
#define MoviePreviewCallOutProc ProcPtr
#else
typedef pascal Boolean (*MoviePreviewCallOutProc)(long refcon);
#endif
pascal void PlayMoviePreview( Movie m, MoviePreviewCallOutProc callOutProc, long refcon )
= {0x303c,0xf2,0xaaaa};
/*************************
* calls for controlling movies & tracks which are playing
**************************/
pascal TimeBase GetMovieTimeBase( Movie m )
= {0x303c,0x12,0xaaaa};
pascal void SetMovieMasterTimeBase( Movie m, TimeBase tb,
const TimeRecord *slaveZero)
= {0x303c,0x167,0xaaaa};
pascal void SetMovieMasterClock( Movie m, Component clockMeister,
const TimeRecord *slaveZero )
= {0x303c,0x168,0xaaaa};
pascal void GetMoviePriority( Movie m, PriorityType *priority )
= {0x303c,0x13,0xaaaa};
pascal void SetMoviePriority( Movie m, const PriorityType *priority )
= {0x303c,0x14,0xaaaa};
pascal void GetMovieGWorld( Movie m, CGrafPtr *port, GDHandle *gdh )
= {0x303c,0x15,0xaaaa};
pascal void SetMovieGWorld( Movie m, CGrafPtr port, GDHandle gdh )
= {0x303c,0x16,0xaaaa};
pascal PicHandle GetMoviePict ( Movie m, TimeValue time )
= {0x303c,0x1d,0xaaaa};
pascal PicHandle GetTrackPict ( Track t, TimeValue time )
= {0x303c,0x1e,0xaaaa};
pascal PicHandle GetMoviePosterPict ( Movie m )
= {0x303c,0xf7,0xaaaa};
pascal OSErr UpdateMovie( Movie m )
= {0x303c,0x1f,0xaaaa}; /* called between Begin & EndUpdate */
/**** spatial movie routines ****/
pascal void GetMovieBox( Movie m, Rect *boxRect )
= {0x303c,0xf9,0xaaaa};
pascal void SetMovieBox( Movie m, const Rect *boxRect )
= {0x303c,0xfa,0xaaaa};
/** movie display clip */
pascal RgnHandle GetMovieDisplayClipRgn( Movie m )
= {0x303c,0xfc,0xaaaa};
pascal void SetMovieDisplayClipRgn( Movie m, RgnHandle theClip )
= {0x303c,0xfd,0xaaaa};
/** movie src clip */
pascal RgnHandle GetMovieSrcClipRgn( Movie m )
= {0x303c,0x100,0xaaaa};
pascal void SetMovieSrcClipRgn( Movie m, RgnHandle theClip )
= {0x303c,0x101,0xaaaa};
/** track src clip */
pascal RgnHandle GetTrackSrcClipRgn( Track theTrack )
= {0x303c,0x102,0xaaaa};
pascal void SetTrackSrcClipRgn( Track theTrack, RgnHandle theClip )
= {0x303c,0x103,0xaaaa};
/** bounds in display space (not clipped by display clip) */
pascal RgnHandle GetMovieDisplayBoundsRgn( Movie m )
= {0x303c,0xfb,0xaaaa};
pascal RgnHandle GetTrackMovieDisplayBoundsRgn( Track t )
= {0x303c,0x112,0xaaaa};
/** bounds in movie space */
pascal RgnHandle GetMovieSrcBoundsRgn( Movie m )
= {0x303c,0xfe,0xaaaa};
pascal RgnHandle GetTrackMovieSrcBoundsRgn( Track t )
= {0x303c,0xff,0xaaaa};
/** bounds in track space */
pascal RgnHandle GetTrackSrcBoundsRgn( Track trackH )
= {0x303c,0x111,0xaaaa};
/** mattes - always in track space */
pascal PixMapHandle GetTrackSrcMatte( Track theTrack )
= {0x303c,0x115,0xaaaa};
pascal void SetTrackSrcMatte( Track theTrack, PixMapHandle theMatte)
= {0x303c,0x116,0xaaaa};
pascal void DisposeMatte( PixMapHandle theMatte )
= {0x303c,0x14a,0xaaaa};
/*************************
* calls for getting/saving movies
**************************/
enum {
newMovieActive = 1<<0,
newMovieDontResolveDataRefs = 1<<1,
newMovieDontAskUnresolvedDataRefs = 1<<2,
newMovieDontAutoAlternates = 1<<3
};
pascal Movie NewMovie( long flags )
= {0x303c,0x187,0xaaaa};
pascal OSErr PutMovieIntoHandle( Movie m, Handle publicMovie )
= {0x303c,0x22,0xaaaa};
pascal void DisposeMovie( Movie m )
= {0x303c,0x23,0xaaaa};
/*************************
* Movie State Routines
**************************/
pascal unsigned long GetMovieCreationTime( Movie m )
= {0x303c,0x26,0xaaaa};
pascal unsigned long GetMovieModificationTime( Movie m )
= {0x303c,0x27,0xaaaa};
pascal TimeScale GetMovieTimeScale( Movie m )
= {0x303c,0x29,0xaaaa};
pascal void SetMovieTimeScale( Movie m, TimeScale timeScale )
= {0x303c,0x2a,0xaaaa};
pascal TimeValue GetMovieDuration( Movie m )
= {0x303c,0x2b,0xaaaa};
pascal Fixed GetMovieRate( Movie m )
= {0x303c,0x2c,0xaaaa};
pascal void SetMovieRate( Movie m, Fixed rate )
= {0x303c,0x2d,0xaaaa};
pascal Fixed GetMoviePreferredRate( Movie m )
= {0x303c,0xf3,0xaaaa};
pascal void SetMoviePreferredRate( Movie m, Fixed rate )
= {0x303c,0xf4,0xaaaa};
pascal short GetMoviePreferredVolume( Movie m )
= {0x303c,0xf5,0xaaaa};
pascal void SetMoviePreferredVolume( Movie m, short volume )
= {0x303c,0xf6,0xaaaa};
pascal short GetMovieVolume( Movie m )
= {0x303c,0x2e,0xaaaa};
pascal void SetMovieVolume( Movie m, short volume )
= {0x303c,0x2f,0xaaaa};
pascal void GetMovieMatrix( Movie m, MatrixRecord *matrix )
= {0x303c,0x31,0xaaaa};
pascal void SetMovieMatrix( Movie m, const MatrixRecord *matrix )
= {0x303c,0x32,0xaaaa};
pascal void GetMoviePreviewTime( Movie m,
TimeValue *previewTime, TimeValue *previewDuration )
= {0x303c,0x33,0xaaaa};
pascal void SetMoviePreviewTime( Movie m,
TimeValue previewTime, TimeValue previewDuration )
= {0x303c,0x34,0xaaaa};
pascal TimeValue GetMoviePosterTime( Movie m )
= {0x303c,0x35,0xaaaa};
pascal void SetMoviePosterTime( Movie m, TimeValue posterTime )
= {0x303c,0x36,0xaaaa};
pascal void GetMovieSelection( Movie m,
TimeValue *selectionTime, TimeValue *selectionDuration )
= {0x303c,0x37,0xaaaa};
pascal void SetMovieSelection( Movie m,
TimeValue selectionTime, TimeValue selectionDuration )
= {0x303c,0x38,0xaaaa};
pascal void SetMovieActiveSegment(Movie m, TimeValue startTime, TimeValue duration)
= {0x303c,0x15c,0xaaaa};
pascal void GetMovieActiveSegment(Movie m, TimeValue *startTime, TimeValue *duration)
= {0x303c,0x15d,0xaaaa};
pascal TimeValue GetMovieTime( Movie m, TimeRecord *currentTime )
= {0x303c,0x39,0xaaaa};
pascal void SetMovieTime( Movie m, const TimeRecord *newtime )
= {0x303c,0x3c,0xaaaa};
pascal void SetMovieTimeValue( Movie m, TimeValue newtime )
= {0x303c,0x3d,0xaaaa};
pascal UserData GetMovieUserData( Movie m )
= {0x303c,0x3e,0xaaaa};
/*************************
* Track/Media finding routines
**************************/
pascal long GetMovieTrackCount( Movie m )
= {0x303c,0x3f,0xaaaa};
pascal Track GetMovieTrack( Movie m, long trackID )
= {0x303c,0x40,0xaaaa};
pascal Track GetMovieIndTrack( Movie m, long index )
= {0x303c,0x117,0xaaaa};
pascal long GetTrackID( Track t )
= {0x303c,0x127,0xaaaa};
pascal Movie GetTrackMovie( Track t )
= {0x303c,0xd0,0xaaaa};
/*************************
* Track creation routines
**************************/
pascal Track NewMovieTrack( Movie m, Fixed width, Fixed height, short trackVolume)
= {0x303c,0x188,0xaaaa};
pascal void DisposeMovieTrack( Track t )
= {0x303c,0x42,0xaaaa};
/*************************
* Track State routines
**************************/
pascal unsigned long GetTrackCreationTime( Track t )
= {0x303c,0x43,0xaaaa};
pascal unsigned long GetTrackModificationTime( Track t )
= {0x303c,0x44,0xaaaa};
pascal Boolean GetTrackEnabled( Track t )
= {0x303c,0x45,0xaaaa};
pascal void SetTrackEnabled( Track t, Boolean isEnabled )
= {0x303c,0x46,0xaaaa};
enum { /* track usage bits */
trackUsageInMovie = 1<<1,
trackUsageInPreview = 1<<2,
trackUsageInPoster = 1<<3
};
pascal long GetTrackUsage( Track t )
= {0x303c,0x47,0xaaaa};
pascal void SetTrackUsage( Track t, long usage )
= {0x303c,0x48,0xaaaa};
pascal TimeValue GetTrackDuration( Track t )
= {0x303c,0x4b,0xaaaa};
pascal TimeValue GetTrackOffset( Track t )
= {0x303c,0x4c,0xaaaa};
pascal void SetTrackOffset( Track t, TimeValue movieOffsetTime )
= {0x303c,0x4d,0xaaaa};
pascal void GetTrackPriority( Track t, PriorityType *priority )
= {0x303c,0x4e,0xaaaa};
pascal void SetTrackPriority( Track t, const PriorityType *priority )
= {0x303c,0x4f,0xaaaa};
pascal short GetTrackLayer( Track t )
= {0x303c,0x50,0xaaaa};
pascal void SetTrackLayer( Track t, short layer )
= {0x303c,0x51,0xaaaa};
pascal Track GetTrackAlternate( Track t )
= {0x303c,0x52,0xaaaa};
pascal void SetTrackAlternate( Track t, Track alternateT )
= {0x303c,0x53,0xaaaa};
pascal void SetAutoTrackAlternatesEnabled(Movie m, Boolean enable)
= {0x303c,0x15e,0xaaaa};
pascal void SelectMovieAlternates(Movie m)
= {0x303c,0x15f,0xaaaa};
pascal short GetTrackVolume( Track t )
= {0x303c,0x54,0xaaaa};
pascal void SetTrackVolume( Track t, short volume )
= {0x303c,0x55,0xaaaa};
pascal void GetTrackMatrix( Track t, MatrixRecord *matrix )
= {0x303c,0x56,0xaaaa};
pascal void SetTrackMatrix( Track t, const MatrixRecord *matrix )
= {0x303c,0x57,0xaaaa};
pascal void GetTrackDimensions( Track t, Fixed *width, Fixed *height )
= {0x303c,0x5d,0xaaaa};
pascal void SetTrackDimensions( Track t, Fixed width, Fixed height )
= {0x303c,0x5e,0xaaaa};
pascal UserData GetTrackUserData( Track t )
= {0x303c,0x5f,0xaaaa};
/*************************
* get Media routines
**************************/
pascal Media NewTrackMedia( Track t, OSType mediaType, TimeScale timeScale,
Handle dataRef, OSType blobType )
= {0x303c,0x18e,0xaaaa};
pascal void DisposeTrackMedia( Media m )
= {0x303c,0x61,0xaaaa};
pascal Media GetTrackMedia( Track t )
= {0x303c,0x62,0xaaaa};
pascal Track GetMediaTrack( Media m )
= {0x303c,0xc5,0xaaaa};
/*************************
* Media State routines
**************************/
pascal unsigned long GetMediaCreationTime( Media m )
= {0x303c,0x66,0xaaaa};
pascal unsigned long GetMediaModificationTime( Media m )
= {0x303c,0x67,0xaaaa};
pascal TimeScale GetMediaTimeScale( Media m )
= {0x303c,0x68,0xaaaa};
pascal void SetMediaTimeScale( Media m, TimeScale timeScale )
= {0x303c,0x69,0xaaaa};
pascal TimeValue GetMediaDuration( Media m )
= {0x303c,0x6a,0xaaaa};
pascal short GetMediaLanguage( Media m )
= {0x303c,0x6b,0xaaaa};
pascal void SetMediaLanguage( Media m, short language )
= {0x303c,0x6c,0xaaaa};
pascal short GetMediaQuality( Media m )
= {0x303c,0x6d,0xaaaa};
pascal void SetMediaQuality( Media m, short quality )
= {0x303c,0x6e,0xaaaa};
pascal void GetMediaHandlerDescription( Media m, OSType *mediaType, Str255 creatorName, OSType *creatorManufacturer )
= {0x303c,0x6f,0xaaaa};
pascal UserData GetMediaUserData( Media m )
= {0x303c,0x70,0xaaaa};
/*************************
* Media Handler routines
**************************/
pascal MediaHandler GetMediaHandler( Media m )
= {0x303c,0x71,0xaaaa};
pascal OSErr SetMediaHandler( Media m, MediaHandler mH )
= {0x303c,0x190,0xaaaa};
/*************************
* Media's Data routines
**************************/
pascal OSErr BeginMediaEdits( Media m )
= {0x303c,0x72,0xaaaa};
pascal OSErr EndMediaEdits( Media m )
= {0x303c,0x73,0xaaaa};
pascal void GetMediaDataHandlerDescription( Media m, short index, OSType *type, Str255 creatorName, OSType *creatorManufacturer )
= {0x303c,0x19e,0xaaaa};
pascal DataHandler GetMediaDataHandler( Media m, short index )
= {0x303c,0x19f,0xaaaa};
pascal OSErr SetMediaDataHandler( Media m, short index, DataHandler dataHandler )
= {0x303c,0x1a0,0xaaaa};
/*************************
* Media Sample Table Routines
**************************/
pascal long GetMediaSampleDescriptionCount( Media m )
= {0x303c,0x77,0xaaaa};
pascal void GetMediaSampleDescription( Media m, long index, SampleDescriptionHandle descH )
= {0x303c,0x78,0xaaaa};
pascal long GetMediaSampleCount( Media m )
= {0x303c,0x79,0xaaaa};
pascal void SampleNumToMediaTime( Media m, long logicalSampleNum,
TimeValue *sampleTime, TimeValue *sampleDuration )
= {0x303c,0x7a,0xaaaa};
pascal void MediaTimeToSampleNum( Media m, TimeValue time,
long *sampleNum, TimeValue *sampleTime, TimeValue *sampleDuration )
= {0x303c,0x7b,0xaaaa};
typedef enum { /* Add/GetMediaSample flags */
sampleNotSync = 1 /* sample is not a sync sample (eg. is frame differenced */
};
pascal OSErr AddMediaSample( Media m, Handle dataIn, long inOffset, unsigned long size,
TimeValue durationPerSample,
SampleDescriptionHandle sampleDescriptionH,
long numberOfSamples, short sampleFlags, TimeValue *sampleTime )
= {0x303c,0x7c,0xaaaa};
pascal OSErr AddMediaSampleReference( Media m, long dataOffset, unsigned long size,
TimeValue durationPerSample,
SampleDescriptionHandle sampleDescriptionH,
long numberOfSamples, short sampleFlags, TimeValue *sampleTime )
= {0x303c,0x7d,0xaaaa};
pascal OSErr GetMediaSample( Media m, Handle dataOut, long maxSizeToGrow, long *size,
TimeValue time, TimeValue *sampleTime, TimeValue *durationPerSample,
SampleDescriptionHandle sampleDescriptionH, long *sampleDescriptionIndex,
long maxNumberOfSamples, long *numberOfSamples, short *sampleFlags )
= {0x303c,0x7e,0xaaaa};
pascal OSErr GetMediaSampleReference( Media m, long *dataOffset, long *size,
TimeValue time, TimeValue *sampleTime, TimeValue *durationPerSample,
SampleDescriptionHandle sampleDescriptionH, long *sampleDescriptionIndex,
long maxNumberOfSamples, long *numberOfSamples, short *sampleFlags )
= {0x303c,0x7f,0xaaaa};
pascal void SetPreferredMediaChunkSize( Media m, long minChunkSize, long maxChunkSize, long padSize )
= {0x303c,0x80,0xaaaa};
/*************************
* Editing Routines
**************************/
/*pascal OSErr InsertTrackMedia( void *Use_InsertMediaIntoTrack_Instead );*/
pascal OSErr InsertMediaIntoTrack( Track trackH,
TimeValue trackStart,
TimeValue mediaTime, TimeValue mediaDuration,
Fixed mediaRate )
= {0x303c,0x183,0xaaaa};
pascal OSErr InsertTrackSegment( Track srcTrack, Track dstTrack,
TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn )
= {0x303c,0x85,0xaaaa};
pascal OSErr InsertMovieSegment( Movie srcMovie, Movie dstMovie,
TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn )
= {0x303c,0x86,0xaaaa};
pascal OSErr InsertEmptyTrackSegment( Track dstTrack,
TimeValue dstIn, TimeValue dstDuration )
= {0x303c,0x87,0xaaaa};
pascal OSErr InsertEmptyMovieSegment( Movie dstMovie,
TimeValue dstIn, TimeValue dstDuration )
= {0x303c,0x88,0xaaaa};
pascal OSErr DeleteTrackSegment( Track t, TimeValue in, TimeValue duration )
= {0x303c,0x89,0xaaaa};
pascal OSErr DeleteMovieSegment( Movie m, TimeValue in, TimeValue duration )
= {0x303c,0x8a,0xaaaa};
pascal OSErr ScaleTrackSegment( Track t, TimeValue in,
TimeValue oldDuration, TimeValue newDuration )
= {0x303c,0x8b,0xaaaa};
pascal OSErr ScaleMovieSegment( Movie m, TimeValue in,
TimeValue oldDuration, TimeValue newDuration )
= {0x303c,0x8c,0xaaaa};
/*************************
* Hi-level Editing Routines
**************************/
pascal Movie CutMovieSelection( Movie m )
= {0x303c,0x8d,0xaaaa};
pascal Movie CopyMovieSelection( Movie m )
= {0x303c,0x8e,0xaaaa};
pascal void PasteMovieSelection( Movie m, Movie src )
= {0x303c,0x8f,0xaaaa};
pascal void AddMovieSelection( Movie m, Movie src )
= {0x303c,0x152,0xaaaa};
pascal void ClearMovieSelection( Movie m )
= {0x303c,0xe1,0xaaaa};
/*************************
* Middle-level Editing Routines
**************************/
pascal OSErr CopyTrackSettings(Track srcTrack, Track dstTrack)
= {0x303c,0x153,0xaaaa};
pascal OSErr CopyMovieSettings(Movie srcMovie, Movie dstMovie)
= {0x303c,0x154,0xaaaa};
/*************************
* movie & track edit state routines
**************************/
pascal MovieEditState NewMovieEditState(Movie m)
= {0x303c,0x104,0xaaaa};
pascal OSErr UseMovieEditState(Movie m, MovieEditState toState)
= {0x303c,0x105,0xaaaa};
pascal OSErr DisposeMovieEditState(MovieEditState state)
= {0x303c,0x106,0xaaaa};
pascal TrackEditState NewTrackEditState(Track t)
= {0x303c,0x107,0xaaaa};
pascal OSErr UseTrackEditState(Track t, TrackEditState state)
= {0x303c,0x108,0xaaaa};
pascal OSErr DisposeTrackEditState(TrackEditState state)
= {0x303c,0x109,0xaaaa};
/*************************
* Movie Timebase Conversion Routines
**************************/
pascal TimeValue TrackTimeToMediaTime( TimeValue value, Track trackH )
= {0x303c,0x96,0xaaaa};
/*************************
* Miscellaneous Routines
**************************/
pascal long GetMovieDataSize( Movie m, TimeValue startTime, TimeValue duration )
= {0x303c,0x98,0xaaaa};
pascal long GetTrackDataSize( Track t, TimeValue startTime, TimeValue duration )
= {0x303c,0x149,0xaaaa};
pascal long GetMediaDataSize( Media m, TimeValue startTime, TimeValue duration)
= {0x303c,0x99,0xaaaa};
pascal Boolean PtInMovie( Movie m, Point pt )
= {0x303c,0x9a,0xaaaa};
pascal Boolean PtInTrack( Track t, Point pt )
= {0x303c,0x9b,0xaaaa};
/*************************
* Group Selection Routines
**************************/
pascal void SetMovieLanguage( Movie m, long language )
= {0x303c,0x9c,0xaaaa};
/*************************
* User Data
**************************/
pascal OSErr GetUserData( UserData u, Handle data, long type, long index )
= {0x303c,0x9e,0xaaaa};
pascal OSErr AddUserData( UserData u, Handle data, long type )
= {0x303c,0x9f,0xaaaa};
pascal OSErr RemoveUserData( UserData u, long type, long index )
= {0x303c,0xa0,0xaaaa};
pascal short CountUserDataType(UserData userDataH, long type)
= {0x303c,0x14b,0xaaaa};
pascal OSErr AddUserDataText(UserData u, Handle data, long type, long index,
short itlRegionTag)
= {0x303c,0x14c,0xaaaa};
pascal OSErr GetUserDataText(UserData u, Handle data, long type, long index,
short itlRegionTag)
= {0x303c,0x14d,0xaaaa};
pascal OSErr RemoveUserDataText(UserData u, long type, long index,
short itlRegionTag)
= {0x303c,0x14e,0xaaaa};
#define nextTimeMediaSample 1
#define nextTimeMediaEdit 2
#define nextTimeTrackEdit 4
#define nextTimeSyncSample 8
#define nextTimeMediaSyncSample 16
#define nextTimeMediaSampleEdgeOK 0x4000
#define nextTimeIgnoreActiveSegment 0x8000
pascal void GetMediaNextInterestingTime( Media m, short flags, TimeValue time, Fixed rate,
TimeValue *interestingTime, TimeValue *interestingDuration )
= {0x303c,0x16d,0xaaaa};
pascal void GetTrackNextInterestingTime( Track t, short flags, TimeValue time, Fixed rate,
TimeValue *interestingTime, TimeValue *interestingDuration )
= {0x303c,0xe2,0xaaaa};
pascal void GetMovieNextInterestingTime( Movie m, short flags,
short numMediaTypes, const OSType *whichMediaTypes,
TimeValue time, Fixed rate,
TimeValue *interestingTime, TimeValue *interestingDuration )
= {0x303c,0x10e,0xaaaa};
/****************************************
* *
* H I G H L E V E L *
* *
****************************************/
#define createMovieFileDeleteCurFile 0x80000000
#define createMovieFileDontCreateMovie 0x40000000
#define createMovieFileDontOpenMovieFile 0x20000000
pascal OSErr CreateMovieFile( const FSSpec *fileSpec, OSType creator,
ScriptCode scriptTag, long flags, short *resRefNum, Movie *newmovie )
= {0x303c,0x191,0xaaaa};
pascal OSErr OpenMovieFile( const FSSpec *fileSpec, short *resRefNum, char perms )
= {0x303c,0x192,0xaaaa};
pascal OSErr CloseMovieFile( short resRefNum )
= {0x303c,0xd5,0xaaaa};
pascal OSErr DeleteMovieFile( const FSSpec *fileSpec )
= {0x303c,0x175,0xaaaa};
enum {
movieInDataForkResID = -1 /* magic res ID */
};
pascal OSErr NewMovieFromFile( Movie *m, short resRefNum, short *resId, char *resName,
short flags, Boolean *dataRefWasChanged )
= {0x303c,0xf0,0xaaaa};
pascal OSErr NewMovieFromHandle( Movie *m, Handle publicMovie,
short flags, Boolean *dataRefWasChanged )
= {0x303c,0xf1,0xaaaa};
pascal OSErr AddMovieResource( Movie m, short resRefNum, short *resId, const char *resName )
= {0x303c,0xd7,0xaaaa};
pascal OSErr UpdateMovieResource( Movie m, short resRefNum, short resId, const char *resName )
= {0x303c,0xd8,0xaaaa};
pascal OSErr RemoveMovieResource( short resRefNum, short resId )
= {0x303c,0x176,0xaaaa};
pascal Boolean HasMovieChanged( Movie m )
= {0x303c,0xd9,0xaaaa};
pascal void ClearMovieChanged( Movie m )
= {0x303c,0x113,0xaaaa};
enum {
addMovieToDataFork = 1L<<0,
flattenActiveTracksOnly = 1L<<2,
dontInterleaveFlatten = 1L<<3
};
pascal void FlattenMovie(Movie m, long flattenFlags,
const FSSpec *theFile, OSType creator, ScriptCode scriptTag,
long creationFlags, short *resId, const char *resName)
= {0x303c,0x19b,0xaaaa};
pascal Movie FlattenMovieData(Movie m, long flattenFlags,
const FSSpec *theFile, OSType creator, ScriptCode scriptTag,
long creationFlags)
= {0x303c,0x19c,0xaaaa};
pascal void SetMovieProgressProc(Movie m, MovieProgressProcPtr p, long refcon)
= {0x303c,0x19a,0xaaaa};
/*************************
* Video Media routines
**************************/
pascal HandlerError GetVideoMediaGraphicsMode( MediaHandler mh,
long *graphicsMode, RGBColor *opColor )
= {0x2f3c,8,257,0x7000,0xa82a};
pascal HandlerError SetVideoMediaGraphicsMode( MediaHandler mh,
long graphicsMode, const RGBColor *opColor )
= {0x2f3c,8,258,0x7000,0xa82a};
/*************************
* Sound Media routines
**************************/
pascal HandlerError GetSoundMediaBalance( MediaHandler mh,
short *balance )
= {0x2f3c,4,257,0x7000,0xa82a};
pascal HandlerError SetSoundMediaBalance( MediaHandler mh,
short balance )
= {0x2f3c,2,258,0x7000,0xa82a};
/*************************
**************************
* new routines
**************************
**************************/
pascal void GetPosterBox( Movie m, Rect *boxRect )
= {0x303c,0x16f,0xaaaa};
pascal void SetPosterBox( Movie m, const Rect *boxRect )
= {0x303c,0x170,0xaaaa};
pascal RgnHandle GetMovieSegmentDisplayBoundsRgn( Movie m, TimeValue time, TimeValue duration )
= {0x303c,0x16c,0xaaaa};
pascal RgnHandle GetTrackSegmentMovieDisplayBoundsRgn( Track t, TimeValue time, TimeValue duration )
= {0x303c,0x16b,0xaaaa};
#if THINK_C==1
#define MovieRgnCoverProc ProcPtr
#else
typedef pascal OSErr (*MovieRgnCoverProc)(Movie m, RgnHandle changedRgn, long refcon);
#endif
pascal void SetMovieCoverProcs(Movie m, MovieRgnCoverProc uncoverProc, MovieRgnCoverProc coverProc, long refcon)
= {0x303c,0x179,0xaaaa};
pascal ComponentResult GetTrackStatus(Track t)
= {0x303c,0x172,0xaaaa};
pascal ComponentResult GetMovieStatus(Movie m, Track *firstProblemTrack)
= {0x303c,0x173,0xaaaa};
/****
Hammer routines
****/
enum {
mcTopLeftMovie = 1<<0, /* usually centered */
mcScaleMovieToFit = 1<<1, /* usually only scales down */
mcWithBadge = 1<<2, /* give me a badge */
mcNotVisible = 1<<3, /* don't show controller */
mcWithFrame = 1<<4 /* gimme a frame */
};
pascal ComponentInstance MCNewMovieController(Movie m, Rect *movieRect, long someFlags)
= {0x303c,0x18a,0xaaaa};
pascal void MCDisposeMovieController(ComponentInstance mc)
= {0x303c,0x18b,0xaaaa};
/*****
Scrap routines
*****/
enum {
movieScrapDontZeroScrap = 1<<0,
movieScrapOnlyPutMovie = 1<<1
};
pascal OSErr PutMovieOnScrap(Movie m, long someMoreFlags)
= {0x303c,0x18c,0xaaaa};
pascal Movie NewMovieFromScrap(long newMovieFlags)
= {0x303c,0x18d,0xaaaa};
/*****
DataRef routines
*****/
typedef enum {
blobSelfReference = 1<<0,
blobWasNotResolved = 1<<1
} blobAttributeEnum;
pascal OSErr GetMediaDataRef( Media media, short index, Handle *blob, OSType *blobType, long *attributes )
= {0x303c,0x197,0xaaaa};
pascal OSErr AddMediaDataRef( Media media, short *index, Handle blob, OSType blobType )
= {0x303c,0x198,0xaaaa};
pascal OSErr GetMediaDataRefCount( Media media, short *count )
= {0x303c,0x199,0xaaaa};
/*****
Playback hint routines
*****/
typedef enum {
hintsScrubMode = 1<<0 /* mask == && (if flags == scrub on, flags != scrub off) */
} playHintsEnum;
pascal void SetMoviePlayHints( Movie movie, long flags, long flagsMask )
= {0x303c,0x1a1,0xaaaa};
pascal void SetMediaPlayHints( Media media, long flags, long flagsMask )
= {0x303c,0x1a2,0xaaaa};
#ifdef __cplusplus
}
#endif __cplusplus
#endif _Movies_